package cn.buk.api.eotms.dto;

import cn.buk.common.flight.dto.FlightInfoDto;
import cn.buk.tms.common.dto.base.BasePassengerDto;
import cn.buk.tms.common.dto.base.BasePriceDto;

import java.util.ArrayList;
import java.util.List;

/**
 * 机票订单创建请求
 * @author yfdai
 */
public class FlightOrderCreateRequest {

  /**
   * 乘机人信息
   */
  private List<BasePassengerDto> passengers;

  /**
   * 航班信息
   */
  private List<FlightInfoDto> flights;

  /**
   * 价格信息
   */
  private List<BasePriceDto> prices;

  /**
   * 选中的增值服务产品的代码
   */
  private List<String> serviceProductCodes;


  /**
   * 订单总价，用于给后台校验是否相符
   */
  private double totalAmount;

  public List<BasePassengerDto> getPassengers() {
    if (passengers == null) {
      passengers = new ArrayList<>();
    }
    return passengers;
  }

  public void setPassengers(List<BasePassengerDto> passengers) {
    this.passengers = passengers;
  }

  public List<FlightInfoDto> getFlights() {
    if (flights == null) {
      flights = new ArrayList<>();
    }
    return flights;
  }

  public void setFlights(List<FlightInfoDto> flights) {
    this.flights = flights;
  }

  public List<BasePriceDto> getPrices() {
    if (prices == null) {
      prices = new ArrayList<>();
    }
    return prices;
  }

  public void setPrices(List<BasePriceDto> prices) {
    this.prices = prices;
  }

  public double getTotalAmount() {
    return totalAmount;
  }

  public void setTotalAmount(double totalAmount) {
    this.totalAmount = totalAmount;
  }

  public List<String> getServiceProductCodes() {
    if (serviceProductCodes == null) {
      serviceProductCodes = new ArrayList<>();
    }
    return serviceProductCodes;
  }

  public void setServiceProductCodes(List<String> serviceProductCodes) {
    this.serviceProductCodes = serviceProductCodes;
  }
}
